import { Dayjs } from "dayjs"

import { TimeRange } from "@/utils"

export interface IAgentProfitLossDetailState {
	staticsDate: number
	currency: string | null
	proxyName: string | null
	betAmount: number
	validBetAmount: number
	flowCorrection: number | string | null
	memberCount: number
	betCount: number
	netAmount: number
	memberNetwinAmount: number
	rebateAmount: number
	memberRebateAmountByProxy: number
	memberRebateAmountByPlat: number
	discountAmount: number | null
	artificialPatchAmount: number | null
	repairBetAmount: number | null
	proxyRebatePoint: number | null
	totalNetAmount: number | null
}

export interface IAgentProfitLossState {
	currency: string
	staticsDate: string
	reportDate: string
	proxyId: string
	proxyName: string
	merchantName: string
	topMerchantName: string
	accountType: number
	parentProxyName: string
	topProxyName: string
	proxyLevel: number
	proxyLevelName: string
	loginLockStatus: number
	paymentLockStatus: number
	status: string
	windControlName: string
	labelName: string
	betAmount: string
	validBetAmount: number
	memberCount: string
	betCount: string
	netAmount: number
	memberNetwinAmount: number
	memberRebateAmount: number
	memberRebateAmountByProxy: number
	memberRebateAmountByPlat: number
	memberArtificialPatchAmount: number
	directMemberCount: number
	directBetCount: number
	directBetAmount: number
	directValidBetAmount: number
	directNetAmount: number
	directRebateAmount: number
	directMemberRebateAmountByProxy: number
	directMemberRebateAmountByPlat: number
	directArtificialPatchAmount: number
	directNetwinAmount: number
	serviceChargeRound: number
	valueAddedTotalAmount: number
	[key: string]: string | number | undefined
}

export interface IAgentProfitLossSummary {
	data: IAgentProfitLossState
}

export interface IQueryAgentProfitLoss {
	accountLevelList?: number[]
	accountType?: string
	maxBetAmount?: string
	maxValidBetAmount?: string
	minBetAmount?: string
	minValidBetAmount?: string
	parentProxyName?: string
	proxyName?: string
	userName?: string
	timeDimension?: number
	startDate?: number | string
	endDate?: number | string
	startMonth?: number | string
	endMonth?: number | string
	orderType?: string
	orderKey?: string
	queryRange?: number[]
}

export interface IQueryAgentProfitLossDetail {
	currency?: string
	dateFlag?: string
	endDate?: number | string
	proxyId?: string
	proxyName?: string
	startDate?: number | string
	staticsMonth?: string | number
}

export interface IAgentProfitLossDetailList {
	pageSize: number
	pageNum: number
	totalRecord: number
	totalPage: number
	record: IAgentProfitLossDetailState[]
	summary: any
}

export interface IAgentProfitLossList {
	pageSize: number
	pageNum: number
	totalRecord: number
	totalPage: number
	record: IAgentProfitLossState[]
	summary: any
}

export interface IGameType {
	gameId: number
	gameTypeId: string
	gameName: string
}

export interface IGameVenue {
	venueTypeCode: string
	venueTypeName: string
	venueCode: string
	venueName: string
	gameTypeList: IGameType[]
}

export interface IGameList {
	gameList: IGameVenue[]
}

export interface IQueryGameProfitQuery {
	endTime?: string
	gameTypeIds?: number[]
	gameTypeName?: string
	startTime?: string
}

export interface IGameProfitSummaryState {
	memberCount?: number
	betCount?: number
	betAmount: number
	validBetAmount: number
	netAmount: number
	betAmountCNY: number
	betAmountVND: number
	betAmountTHB: number
	validBetAmountCNY: number
	validBetAmountVND: number
	validBetAmountTHB: number
	netAmountCNY: number
	netAmountVND: number
	netAmountTHB: number
	[key: string]: string | number | undefined
}

export interface IGameProfitSummary {
	data: IGameProfitSummaryState
}

export interface IGameProfitState extends IGameProfitSummaryState {
	id?: string
	merchantId: string
	staticsDate?: string | number
	gameTypeId: string
	gameTypeName: string
	gameCode: string
	venueName: string
}

export interface IGameProfitList extends Omit<IAgentProfitLossList, "record"> {
	record: IGameProfitState[]
}

export interface IQueryGameProfitDetail {
	currency?: string
	endTime?: string
	gameCode?: string
	gameTypeId?: string
	gameTypeName?: string
	merchantId?: string
	startTime?: string
	venueName?: string
}

export interface IProxyProfitAndLossListParams {
	accountLevelList?: number[]
	userName?: string
	minBetAmount?: string
	maxBetAmount?: string
	minValidBetAmount?: string
	maxValidBetAmount?: string
	proxyName?: string
	parentProxyName?: string
	accountType?: string
	startDate?: number
	endDate?: number
	startMonth?: number
	endMonth?: number
	venueTypes?: string[]
	startTime?: string
	endTime?: string
	staticsDate?: TimeRange
	orderKey?: string
	orderType?: string
	topProxyName?: string
	minBetCount?: string
	maxBetCount?: string
	minNetAmount?: string
	maxNetAmount?: string
	minNetProfit?: string
	maxNetProfit?: string
	date: TimeRange
}

export interface IProxyProfitAndLoss {
	cycleName: string
	memberId: string
	merchantId: string
	memberName: string
	parentProxyId: string
	parentProxyName: string
	topProxyId: string
	topProxyName: string
	merchantName: string
	businessModel: number
	dxClubBetCount: number
	dxClubTotalServiceChargeContributionAmount: number
	dxClubNetAmount: number
	dxClubServiceChargeRoundAmount: number
	dxInsureBetCount: number
	dxInsureBetAmount: number
	dxInsureValidBetAmount: number
	dxClubServiceChargeHandAmount: number
	dxInsureNetAmount: number
	dxValueAddedTotalAmount: number
	dxClubMemberRebateAmount: number
	dxClubProxyRebateAmount: number
	dxMemberVenueNetAmount: number
	otherBetCount: number
	otherBetAmount: number
	otherValidBetAmount: number
	otherValidBetRecalculationAdjustmentAmount: number
	otherFactValidBetAmount: number
	otherNetAmount: number
	otherNetRecalculationAdjustmentAmount: number
	otherFactNetAmount: number
	otherVenueMemberRebateAmount: number
	otherProxyRebateAmount: number
	otherMemberRebateRecalculationAdjustmentAmount: number
	otherAmount: number
	otherMemberVenueNetAmount: number
	accountAdjustmentAmount: number
	rebateAdjustmentAmount: number
	netProfit: number
	betCount: number
	betAmount: number
	validBetAmount: number
	rebateAmount: number
	betNetAmount: number
	netAmount: number
	tyBetCount: number
	tyBetAmount: number
	tyValidBetAmount: number
	tyValidBetRecalculationAdjustmentAmount: number
	tyFactValidBetAmount: number
	tyNetAmount: number
	tyNetRecalculationAdjustmentAmount: number
	tyFactNetAmount: number
	tyVenueMemberRebateAmount: number
	tyProxyRebateAmount: number
	tyMemberRebateRecalculationAdjustmentAmount: number
	tyMemberVenueNetAmount: number
	zrBetCount: number
	zrBetAmount: number
	zrValidBetAmount: number
	zrValidBetRecalculationAdjustmentAmount: number
	zrFactValidBetAmount: number
	zrNetAmount: number
	zrNetRecalculationAdjustmentAmount: number
	zrFactNetAmount: number
	zrVenueMemberRebateAmount: number
	zrProxyRebateAmount: number
	zrMemberRebateRecalculationAdjustmentAmount: number
	zrMemberVenueNetAmount: number
	zrRewardAmount: number
	qpBetCount: number
	qpBetAmount: number
	qpValidBetAmount: number
	qpNetAmount: number
	qpVenueMemberRebateAmount: number
	qpProxyRebateAmount: number
	qpMemberVenueNetAmount: number
	djBetCount: number
	djBetAmount: number
	djValidBetAmount: number
	djValidBetRecalculationAdjustmentAmount: number
	djFactValidBetAmount: number
	djNetAmount: number
	djNetRecalculationAdjustmentAmount: number
	djFactNetAmount: number
	djVenueMemberRebateAmount: number
	djProxyRebateAmount: number
	djMemberRebateRecalculationAdjustmentAmount: number
	djMemberVenueNetAmount: number
	cpBetCount: number
	cpBetAmount: number
	cpValidBetAmount: number
	cpValidBetRecalculationAdjustmentAmount: number
	cpFactValidBetAmount: number
	cpNetAmount: number
	cpNetRecalculationAdjustmentAmount: number
	dyMemberRebateRecalculationAdjustmentAmount: number
	cpFactNetAmount: number
	cpVenueMemberRebateAmount: number
	cpProxyRebateAmount: number
	cpMemberRebateRecalculationAdjustmentAmount: number
	cpMemberVenueNetAmount: number
	dyBetCount: number
	dyBetAmount: number
	dyValidBetAmount: number
	dyNetAmount: number
	dyVenueMemberRebateAmount: number
	dyProxyRebateAmount: number
	dyMemberVenueNetAmount: number
	dyActivityBonusAmount: number
	dxClubServiceChargeHandContributionAmount: number
	dxClubServiceChargeRoundContributionAmount: number
	serviceChargeHandContributionRate: number
	serviceChargeRoundContributionRate: number
	accountFinanceAdjustSubAmount: number
	accountFinanceAdjustAddAmount: number
	accountOperatorAdjustSubAmount: number
	accountOperatorAdjustAddAmount: number
	accountViolationAmount: number
	tyPlatformRebateAmount: number
	zrPlatformRebateAmount: number
	qpPlatformRebateAmount: number
	djPlatformRebateAmount: number
	cpPlatformRebateAmount: number
	dyPlatformRebateAmount: number
	dxClubPlatformRebateAmount: number
	platformRebateAmount: number
	otherPlatformRebateAmount: number
	totalTyPlatformRebateAmount: number
	totalZrPlatformRebateAmount: number
	totalQpPlatformRebateAmount: number
	totalDjPlatformRebateAmount: number
	totalCpPlatformRebateAmount: number
	totalDyPlatformRebateAmount: number
	qpMemberRebateRecalculationAdjustmentAmount: number
	totalDxClubPlatformRebateAmount: number
	totalPlatformRebateAmount: number
	totalOtherPlatformRebateAmount: number
	totalOtherTypeAmount: number
	totalAccountAdjustAmount: number
	totalOtherAmount: number
	dxSquidNetAmount: number
	[key: string]: string | number | undefined
}

export interface IMemberVenueDetail {
	dateTime: string
	venueId: number
	venueName: string
	venueType: string
	betType: string
	betCount: number
	betAmount: number
	effectiveBetAmount: number
	pumPing: number
	betProfitLoss: number
}

export interface IMemberVenueDetailMap {
	[key: string]: IMemberVenueDetail
}

export interface ISummaryRespDTO {
	betCount: number
	betAmount: number
	effectiveBetAmount: number
	pumPing: number
	betProfitLoss: number
}
export interface IGetMemberNetAmountDetailResponse {
	memberVenueDetailList: null
	memberVenueDetailMap: IMemberVenueDetailMap
	summaryRespDTO: ISummaryRespDTO
}

export interface IGetMemberNetAmountDetailParams {
	endDate: string
	parentProxyId: string
	playerId: string
	startDate: string
	staticsDate: number
	userName: string
}

export interface IQueryVenueProfitDetail {
	currency?: string
	endTime?: string
	gameCode?: string
	merchantId?: string
	startTime?: string
	venueName?: string
}

export interface IQueryVenueProfitLoss {
	endTime?: string
	startTime?: string
	venueCodes?: string[]
}

export interface IVenueProfitLossStateDay {
	staticsDate: string
	dxMemberCount: number
	dxBetCount: number
	dxBetAmount: number
	dxValidBetAmount: number
	dxNetAmount: number
	dxMemberPumpPercentageAmount: number
	dxProxyPumpPercentageAmount: number
	dxProxyPumpPercentageAmountRebate: number
	dxProxyPumpPercentageAmountCommission: number
	dxCompanyPumpPercentageAmount: number
	dxMemberInsuredNetAmount: number
	dxProxyInsuredNetAmount: number
	dxCompanyInsuredNetAmount: number
	pmtyMemberCount: number
	pmtyBetCount: number
	pmtyBetAmount: number
	pmtyValidBetAmount: number
	pmtyNetAmount: number
	pmzrMemberCount: number
	pmzrBetCount: number
	pmzrBetAmount: number
	pmzrValidBetAmount: number
	pmzrNetAmount: number
	byqpMemberCount: number
	byqpBetCount: number
	byqpBetAmount: number
	byqpValidBetAmount: number
	byqpNetAmount: number
	pmcpMemberCount: number
	pmcpBetCount: number
	pmcpBetAmount: number
	pmcpValidBetAmount: number
	pmcpNetAmount: number
	pmdjMemberCount: number
	pmdjBetCount: number
	pmdjBetAmount: number
	pmdjValidBetAmount: number
	pmdjNetAmount: number
	dyMemberCount: number
	dyBetCount: number
	dyBetAmount: number
	dyValidBetAmount: number
	dyNetAmount: number
	dyNetRate: number
	dxPumpPercentageNetRate: number
	dxInsuredNetRate: number
	pmdjNetRate: number
	pmcpNetRate: number
	pmqpNetRate: number
	pmzrNetRate: number
	pmtyNetRate: number
	pumpBetAmount: number
	insuredBetAmount: number
	memberValueAddedAmount: number
	proxyValueAddedPercentageAmount: number
	companyValueAddedPercentageAmount: number
	valueAddedAmountRate: number
}

export interface IVenueProfitLossStateVenue extends IGameProfitSummaryState {
	netRate: number
	memberPumpPercentageAmount: number
	proxyPumpPercentageAmount: number
	dxProxyPumpPercentageAmountRebate: number
	dxProxyPumpPercentageAmountCommission: number
	companyPumpPercentageAmount: number
	memberInsuredNetAmount: number
	proxyInsuredNetAmount: number
	companyInsuredNetAmount: number
	pumpBetAmount: number
	insuredBetAmount: number
	memberValueAddedAmount: number
	proxyValueAddedPercentageAmount: number
	companyValueAddedPercentageAmount: number
	valueAddedAmountRate: number
	merchantId?: string
	gameCode: string
	venueName: string
	venueType: string
	venueTypeName: string
}

export interface IVenueProfitLossDayList extends Omit<IAgentProfitLossList, "record"> {
	record: IVenueProfitLossStateDay[]
}

export interface IVenueProfitLossStateVenueList extends Omit<IAgentProfitLossList, "record"> {
	record: IVenueProfitLossStateVenue[]
}

export interface IVenueState {
	id: number
	gameCode: string
	venueName: string
	venueEnName: string
	venueThName: string
	venueVnName: string
}

export interface IStatusOverviewTripartiteState {
	staticsDate: number | null
	newMemberNum: number | null
	validUserCount: number | null
	activeMemberNum: number | null
	betAmount: number | null
	validBetAmount: number | null
	netAmount: number | null
	netRate: number | null
	platformNetAmount: number | null
	commissionNetAmount: number | null
	platformRebateAmount: number | null
	commissionRebateAmount: number | null
	commissionRebate: number | null
	totalAcctadjustAmount: number | null
	platformIncomeAmount: number | null
	platformBottomAmount: number | null
	platformAllIncomeAmount: number | null
	operate: number | null
}

export interface IStatusOverviewTripartiteList extends Omit<IAgentProfitLossList, "record"> {
	record: IStatusOverviewTripartiteState[]
}

export interface IQueryStatusOverviewTripartite {
	dataAreaType?: number
	startDate?: string
	endDate?: string
	reportDate?: string
}

export interface IBottomTripartiteState {
	id: number
	merchantId: string | null
	merchantName: string
	reportDate: number
	userId: string | null
	userName: string | null
	parentProxyId: string | null
	parentProxyName: string | null
	topProxyId: string | null
	topProxyName: string | null
	betAmount: number | null
	netAmount: number | null
	zhanchengRate: number | null
	rebateRate: number | null
	backflowRate: number | null
	netwinAmount: number | null
	platformBottomAmount: number | null
	createdBy: string | null
	createdAt: string | null
	updatedBy: string | null
	updatedAt: string | null
}

export interface IStatusBottomTripartiteList extends Omit<IAgentProfitLossList, "record"> {
	record: IBottomTripartiteState[]
	summary: any
}

export interface IQueryPlatformBottomRecord {
	reportDate?: string
}

export interface IBottomQuery {
	id?: string
	backflowRate?: string
	betAmount?: string
	merchantId?: string
	merchantName?: string
	netAmount?: string
	netwinAmount?: string
	parentProxyName?: string
	platformBottomAmount?: string
	rebateRate?: string
	reportDate?: string
	topProxyName?: string
	userName?: string
	zhanchengRate?: string
}

export interface IQueryMemberLossRanking {
	memberName?: string
	netType?: number
	reportEdDate?: string | any
	reportStDate?: string | any
	topProxyName?: string
}

export interface IMemberLossRankingTotal {
	creditQuota: number
	loanAmount: number
	validBetAmount: number
	maxBetAmount: number
	hisRebateAmount: number
	netAmount: number
	hisNetAmount: number
}

export interface IMemberLossRanking {
	id: string
	reportDate: string | number
	memberRank: string
	netType: number
	memberId: string
	memberName: string
	topProxyId: number
	topProxyName: string
	creditQuota: number
	loanAmount: number
	venueName: string
	validBetAmount: number
	maxBetAmount: number
	hisRebateAmount: number
	netAmount: number
	hisNetAmount: number
}

export interface IMemberLossRankingList extends Omit<IAgentProfitLossList, "record"> {
	record: IMemberLossRanking[]
}

export interface IRebateReconciliationState {
	netAt: number
	betNo: string
	betTime: string
	venueType: string
	venueTypeName: string
	venueName: string
	gameName: string
	gameAccount: string
	memberAccount: string
	parentProxyName: string
	topProxyName: string
	merchantName: string
	betType: string
	betAmount: number
	validBetAmount: number
	memberNetAmount: number
	platformRebateRate: number
	proxyRebateRate: number
	rebateAmount: number
	realPlatformRebateRate: number
	realProxyRebateRate: number
	realRebateAmount: number
}

export interface IRebateReconciliationList extends Omit<IAgentProfitLossList, "record"> {
	record: IRebateReconciliationState[]
	summary: IRebateReconciliationState
}

export interface IQueryRebateReconciliation {
	betNo?: string
	gameName?: string
	memberName?: string
	netAtEnd?: string
	netAtStart?: string
	parentProxyName?: string
	topProxyName?: string
	venueName?: string
	venueType?: string
}

export interface IRebateVenueState {
	venueId: number
	venueCode: string
	venueName: string
	venueEnName: string
	venueThName: string | null
	venueVnName: string | null
	venueType: string
	venueTypeName: string
	walletNames: string
	isOb: number
	status: number
	venueSort: number
	remark: string
	changeStatusRemark: string
	currencyTypes: string
	languageTypes: string
	venueIconUrlApp: string | null
	venueIconUrlPc: string | null
	venueTransferIconUrlApp: string | null
	venueTransferIconUrlPc: string | null
	venueWalletIconUrl: string | null
	createdBy: string
	createdAt: string
	updatedBy: string
	updatedAt: string
	statusUpdatedBy: string
	statusUpdatedAt: string
	ipAddr: string
	sourceType: number
}

export interface IMemberExpectedState {
	memberId: string
	memberAccount: string
	staticsDate: number
	proxyId: string | null
	merchantId: string
	proxyAccount: string
	topProxyAccount: string
	merchantName: string
	rebateAmount: number
	rebateAmountDxClub: number
	rebateAmountZr: number
	rebateAmountTy: number
	rebateAmountDj: number
	rebateAmountQp: number
	rebateAmountCp: number
	rebateAmountDy: number
}

export interface IQueryMemberExpected {
	memberAccount?: string
	proxyName?: string
	topProxyAccount?: string
}

export interface IMemberExpectedList extends Omit<IAgentProfitLossList, "record"> {
	record: IMemberExpectedState[]
}

export interface IMemberRateDetail {
	reportDate: string
	currency: string
	personRebateAmount: number
	payoutStatus: number
	memberName: number
	rebateAmount?: number
}

export interface IMemberRateDetailList extends Omit<IAgentProfitLossList, "record"> {
	record: IMemberRateDetail[]
	summary: IMemberRateDetail
}

export interface IQueryMemberRateDetail {
	memberId?: string
	reportEndDate?: number
	reportStartDate?: number
}

export interface IMemberTeamRebate {
	platformFlag: string
	venueName: string
	rebateAmount: number
	rebateRate: number
	validBetAmount: number
	serviceChargeHand: number
	serviceChargeRound: number
	serviceAmount: number
	serviceChargeHandContribution: number
	serviceChargeRoundContribution: number
	serviceAmountContribution: number
}

export interface IQueryMemberTeamRebate {
	id: string
	reportDate: string
}

export interface IBetDetailState {
	userName: string
	nickName: string
	accountType: number
	parentProxyName: string
	topProxyName: string
	loginLockStatus: number
	paymentLockStatus: number
	gameLockStatus: number
	betCount: number
	betAmount: number
	validBetAmount: number
	netAmount: number
}

export interface IQueryBetDetail {
	endTime?: string
	startTime?: string
	venueCode?: string
}

export interface IBetDetailList extends Omit<IAgentProfitLossList, "record"> {
	record: IBetDetailState[]
	summary: IBetDetailState
}

export interface IMemberReturnDataListRecord {
	staticsDate: string
	memberId: number
	memberName: string
	parentProxyName: string
	topProxyName: string
	rebateAmount: number
	rebateAmountDxClub: number
	rebateAmountZr: number
	rebateAmountTy: number
	rebateAmountDj: number
	rebateAmountQp: number
	rebateAmountCp: number
	rebateAmountDy: number
}

export interface IMemberReturnDataList extends Omit<IAgentProfitLossList, "record"> {
	record: IMemberReturnDataListRecord[]
}

export interface IMemberReturnDataQueryParams {
	memberName?: string
	parentProxyName?: string
	topProxyName?: string
	reportEdDate?: string
	reportStDate?: string
}
export interface IMemberReturnDataSummary {
	rebateAmount?: number
	rebateAmountCp?: number
	rebateAmountDj?: number
	rebateAmountDxClub?: number
	rebateAmountDy?: number
	rebateAmountQp?: number
	rebateAmountTy?: number
	rebateAmountZr?: number
	[key: string]: string | number | undefined
}
export interface IDataCompareDay {
	reportDate: number
	staticsDate: string
	effecactiveMemberNum: number
	activeMemberNum: number
	validBetAmount: number
	platformNetAmount: number
	platformIncomeAmount: number
	[key: string]: string | number | undefined
}
export interface IDataCompareDayParams {
	startTime: number
	endTime: number
	time: TimeRange
}

export interface IDailyDxReportDParams {
	startDate: number
	endDate: number
	date: TimeRange
}
export interface IDailyDxReportD {
	dataType: string
	creditQuota: number
	newCreditQuota: number
	withdrawAmount: number
	depositAmount: number
	loanAmount: number
	newLoanAmount: number
	shouldRepaymentAmount: number
	shouldPaymentAmount: number
	newEffectiveNum: number
	activeNum: number
	validBetAmount: number
	netAmount: number
	memberRebateAmount: number
	proxyRebateAmount: number
	platformIncomeAmount: number
	totalRepayQuota: number
	newRepayQuota: number
}

export interface IDailyDetailDxReportDParams {
	startDate: string
	endDate: string
	payType: "payIn" | "payOut"
	dataType: string
}

export interface IDailyDetailData {
	dataType: string | null
	channelName: string
	placedOrders: string
	totalOrders: number
	successfulOrders: number
	successfulRate: string
	amount: number
	payType: string | null
}

export interface IMemberReturnDataReportParams {
	memberId?: string
	reportDate?: string
}
export interface IMemberReturnDataReportDialogData {
	personRebateAmount: number
	platformFlag: string
	rebateRatio: number
	serviceAmountContribution: number
	serviceChargeHand: number
	serviceChargeHandContribution: number
	serviceChargeRound: number
	serviceChargeRoundContribution: number
	totalPumpContribution: number
	validBetAmount: number
	venueName: string
}
export interface IMemberReturnDataReportList extends Omit<IAgentProfitLossList, "record"> {
	memberName: string
	personRebateAmount: number
	platformFlagRebate: IMemberReturnDataReportDialogData[]
	rebateType: number
	reportDate: string
}
export interface IAgentAndLossRankingQueryParams {
	teamType?: number
	topProxyName?: string
	reportStDate?: string
	reportEdDate?: string
}
export interface IAgentAndLossRankingData {
	creditBalance: number
	creditQuota: number
	directlyMemberValidBetAmount: number
	id: string
	merchantId: number
	merchantName: string
	netAmount: number
	reportDate: number
	teamRebateAmount: number
	teamReturnLoan: number
	teamType: number
	teamWithdrawable: number
	topProxyId: number
	topProxyName: string
	topProxyRank: string
	validBetAmount: number
}
export interface IAgentAndLossRakingDataList extends Omit<IAgentProfitLossList, "record"> {
	record: IAgentAndLossRankingData[]
}

export interface IQueryMemberNetAmountValueAddedListParams {
	memberId: string
	reportEndDate: number
	reportStartDate: number
}

export interface IQueryMemberNetAmountValueAddedState {
	order: number
	valueAddedAmount: number
	valueAddedName: string
}
export interface IName {
	id: number
	levelName: string
}

export interface IAgentProfitDayTotal {
	cycleName: string
	reportDate: string
	proxyId: string
	proxyName: string
	proxyLevel: string
	proxyLevelName: string
	parentProxyName: string
	topProxyName: string
	businessModel: number
	dxClubServiceChargeHandBetCount: number
	dxClubNetAmount: number
	dxSquidNetAmount: number
	dxClubServiceChargeRoundAmount: number
	dxClubServiceChargeHandAmount: number
	dxClubTotalServiceChargeContributionAmount: number
	dxClubServiceChargeContributionRebateAmount: number
	dxInsureBetCount: number
	dxInsureBetAmount: number
	dxInsureValidBetAmount: number
	dxInsureNetAmount: number
	dxInsureNetRebateAmount: number
	dxValueAddedTotalAmount: number
	dxValueAddedTotalRebateAmount: number
	dxTotalNetAmount: number
	otherBetCount: number
	otherBetAmount: number
	otherNetAmount: number
	otherNetRecalculationAdjustmentAmount: number
	otherPartNetAmount: number
	otherValidBetAmount: number
	otherRebateAmount: number
	otherPartRebateAmount: number
	otherRebateRecalculationAdjustmentAmount: number
	otherPartRebateRecalculationAmount: number
	otherAmount: number
	otherTotalNetAmount: number
	tyBetCount: number
	tyBetAmount: number
	tyNetAmount: number
	tyNetRecalculationAdjustmentAmount: number
	tyPartNetAmount: number
	tyValidBetAmount: number
	tyRebateAmount: number
	tyPartRebateAmount: number
	tyRebateRecalculationAdjustmentAmount: number
	tyPartRebateRecalculationAmount: number
	tyTotalNetAmount: number
	zrBetCount: number
	zrBetAmount: number
	zrNetAmount: number
	zrNetRecalculationAdjustmentAmount: number
	zrPartNetAmount: number
	zrValidBetAmount: number
	zrRebateAmount: number
	zrPartRebateAmount: number
	zrRebateRecalculationAdjustmentAmount: number
	zrPartRebateRecalculationAmount: number
	zrRewardAmount: number
	zrTotalNetAmount: number
	qpBetCount: number
	qpBetAmount: number
	qpValidBetAmount: number
	qpNetAmount: number
	qpPartNetAmount: number
	qpRebateAmount: number
	qpPartRebateAmount: number
	qpTotalNetAmount: number
	djBetCount: number
	djBetAmount: number
	djNetAmount: number
	djNetRecalculationAdjustmentAmount: number
	djPartNetAmount: number
	djValidBetAmount: number
	djRebateAmount: number
	djPartRebateAmount: number
	djRebateRecalculationAdjustmentAmount: number
	djPartRebateRecalculationAmount: number
	djTotalNetAmount: number
	cpBetCount: number
	cpBetAmount: number
	cpNetAmount: number
	cpNetRecalculationAdjustmentAmount: number
	cpPartNetAmount: number
	cpValidBetAmount: number
	cpRebateAmount: number
	cpPartRebateAmount: number
	cpRebateRecalculationAdjustmentAmount: number
	cpPartRebateRecalculationAmount: number
	cpTotalNetAmount: number
	dyBetCount: number
	dyBetAmount: number
	dyNetAmount: number
	dyPartNetAmount: number
	dyValidBetAmount: number
	dyRebateAmount: number
	dyPartRebateAmount: number
	dyActivityBonusAmount: number
	dyTotalNetAmount: number
	memberRebateAdjustmentAmount: number
	memberAccountAdjustmentAmount: number
	proxyAccountAdjustmentAmount: number
	proxyRebateAdjustmentAmount: number
	otherAdjustmentTotalNetAmount: number
	dxClubServiceChargeHandContributionAmount: number
	dxClubServiceChargeRoundContributionAmount: number
	serviceChargeHandContributionRate: number
	serviceChargeRoundContributionRate: number
	totalNetAmount: number
	totalBetCount: number
}

export interface IAgentProfitDayTotalList extends Omit<IAgentProfitLossList, "record"> {
	record: IAgentProfitDayTotal[]
	summary: IAgentProfitDayTotal
}

export interface IProxyNetAmountRecalList extends Omit<IAgentProfitLossList, "record"> {
	record: IProxyNetAmountRecal[]
	summary: IProxyNetAmountRecal
}

export interface IProxyNetAmountQuery {
	dateFlag?: string
	endDate?: number
	proxyId?: string
	proxyName?: string
	startDate?: number
}

export interface IProxyNetAmountRecal {
	cycleName: string
	reportDate: number
	proxyId: string
	proxyName: string
	proxyLevel: number
	proxyLevelName: string
	parentProxyName: string
	topProxyName: "zxc01"
	businessModel: 1
	dxClubServiceChargeHandBetCount: number
	dxClubNetAmount: number
	dxSquidNetAmount: number
	dxClubServiceChargeRoundAmount: number
	dxClubServiceChargeHandAmount: number
	dxClubTotalServiceChargeContributionAmount: number
	dxClubServiceChargeContributionRebateAmount: number
	dxInsureBetCount: number
	dxInsureBetAmount: number
	dxInsureValidBetAmount: number
	dxInsureNetAmount: number
	dxInsureNetRebateAmount: number
	dxValueAddedTotalAmount: number
	dxValueAddedTotalRebateAmount: number
	dxTotalNetAmount: number
	otherBetCount: number
	otherBetAmount: number
	otherNetAmount: number
	otherNetRecalculationAdjustmentAmount: number
	otherPartNetAmount: number
	otherValidBetAmount: number
	otherRebateAmount: number
	otherPartRebateAmount: number
	otherRebateRecalculationAdjustmentAmount: number
	otherPartRebateRecalculationAmount: number
	otherAmount: number
	otherTotalNetAmount: number
	tyBetCount: number
	tyBetAmount: number
	tyNetAmount: number
	tyNetRecalculationAdjustmentAmount: number
	tyPartNetAmount: number
	tyValidBetAmount: number
	tyRebateAmount: number
	tyPartRebateAmount: number
	tyRebateRecalculationAdjustmentAmount: number
	tyPartRebateRecalculationAmount: number
	tyTotalNetAmount: number
	zrBetCount: number
	zrBetAmount: number
	zrNetAmount: number
	zrNetRecalculationAdjustmentAmount: number
	zrPartNetAmount: number
	zrValidBetAmount: number
	zrRebateAmount: number
	zrPartRebateAmount: number
	zrRebateRecalculationAdjustmentAmount: number
	zrPartRebateRecalculationAmount: number
	zrRewardAmount: number
	zrTotalNetAmount: number
	qpBetCount: number
	qpBetAmount: number
	qpValidBetAmount: number
	qpNetAmount: number
	qpPartNetAmount: number
	qpRebateAmount: number
	qpPartRebateAmount: number
	qpTotalNetAmount: number
	djBetCount: number
	djBetAmount: number
	djNetAmount: number
	djNetRecalculationAdjustmentAmount: number
	djPartNetAmount: number
	djValidBetAmount: number
	djRebateAmount: number
	djPartRebateAmount: number
	djRebateRecalculationAdjustmentAmount: number
	djPartRebateRecalculationAmount: number
	djTotalNetAmount: number
	cpBetCount: number
	cpBetAmount: number
	cpNetAmount: number
	cpNetRecalculationAdjustmentAmount: number
	cpPartNetAmount: number
	cpValidBetAmount: number
	cpRebateAmount: number
	cpPartRebateAmount: number
	cpRebateRecalculationAdjustmentAmount: number
	cpPartRebateRecalculationAmount: number
	cpTotalNetAmount: number
	dyBetCount: number
	dyBetAmount: number
	dyNetAmount: number
	dyPartNetAmount: number
	dyValidBetAmount: number
	dyRebateAmount: number
	dyPartRebateAmount: number
	dyActivityBonusAmount: number
	dyTotalNetAmount: number
	memberRebateAdjustmentAmount: number
	memberAccountAdjustmentAmount: number
	proxyAccountAdjustmentAmount: number
	proxyRebateAdjustmentAmount: number
	otherAdjustmentTotalNetAmount: number
	dxClubServiceChargeHandContributionAmount: number
	dxClubServiceChargeRoundContributionAmount: number
	serviceChargeHandContributionRate: number
	serviceChargeRoundContributionRate: number
	totalNetAmount: number
	totalBetCount: number
}

export interface IQueryProxyNetAmountOrder {
	endDate?: string | number
	proxyId?: string
	memberId?: string
	reportDate?: string | null
	startDate?: string | number
	venueCode?: string
}

export interface IProxyNetAmountOrderList extends Omit<IAgentProfitLossList, "record"> {
	record: IProxyNetAmountOrder[]
	summary: IProxyNetAmountOrder
}

export interface IRecalOrder {
	orderId: string
	orderNo: string
	memberId: string
	memberName: string
	proxyId: string
	proxyName: string
	venueCode: string
	venueName: string
	netAt: string
	obSettleCount: number
	settlementStatus: number
	betAmount: number
	validBetAmount: number
	netAmount: number
	validBetAmountRecalculateAdjust: number
	netAmountRecalculateAdjust: number
	rebateRate: number
	rebateAmount: number
	rebateAmountRecal: number
	teamRebateRate: number
	teamRebateAmountRecalculateAdjust: number
	teamZhanChengRebateRate: number
	teamRebatePartAmountRecalculateAdjust: number
	recalDateTime: string
	firstNetAt: string
	lastRecalOrderId: string
	orderIdRecal: string
}

export interface IProxyNetAmountOrder {
	betOrderNo: string
	venueCode: string
	venueName: string
	memberId: string
	memberName: string
	validNetAmountRecalculateAdjust: number
	netAmountRecalculateAdjust: number
	teamRebateAmountRecalculateAdjust: number
	netAmountRecalculateAdjustParent: number
	recalDateTime: string
	rebateAmount: number
	rebateAmountRecal: number
	proxyMemberRecalculateBetRecordList: IRecalOrder[]
}

export interface ITexasReportList extends Omit<IAgentProfitLossList, "record"> {
	record: ITexasReportState[]
	summary: ITexasReportState
}

export interface ITexasReportState {
	reportDate: string
	betAmount: number
	validBetAmount: number
	pumpAmount: number
	proxyPumpAmount: number
	proxyPumpRatio: number
	insureAmount: number
	insureValidBetAmount: number
	insureMemberNetAmount: number
	insurePlatformNetAmount: number
	insureProxyProportion: number
	insureWinRatio: number
	adjustAmount: number
	platformIncomeAmount: number
	platformPumpAmount: number
	serviceChargeRoundContribution: number
	platformServiceChargeRoundContribution: number
	proxyServiceChargeRoundContribution: number
	proxyServiceChargeRoundContributionRate: number
	valueAddedTotalAmount: number
	platformValueAddedTotalAmount: number
	proxyValueAddedTotalAmount: number
	platformValueAddedTotalAmountAvgRate: number
}

export interface IProxyReportList extends Omit<IAgentProfitLossList, "record"> {
	record: IProxyReportState[]
	summary: IProxyReportState
	playerName: string
}

export interface IQueryProxyReportList {
	proxyName?: string
	parentProxyName?: string
	accountType?: string
	queryWay?: number
	startTime?: string
	endTime?: string
	registerTime: [Dayjs, Dayjs]
}

export interface VpiueryProxyReportList {
	parentProxyName?: string
	playerName?: string
	accountType?: string
	queryWay?: number
	startTime?: string
	endTime?: string
	merchantId?: string
	userId?: string
}

export interface IProxyReportState {
	proxyId: string
	proxyAccount: string
	proxyLevel: string
	accountType: number
	topProxyAccount: string
	merchantName: string
	topMerchantName: string
	loginLockStatus: number
	accountLockStatus: number
	windControlName: string
	labelId: string
	registerAt: string
	depositAmount: number
	depositTimes: string
	withdrawAmount: number
	withdrawTimes: string
	depositWithdrawDifferAmount: number
	totalIncomeAmount: number
	memberFirstDepositAmount: number
	memberFirstDepositNum: number
	memberRegisterAndFirstDepositNum: number
	memberNetAmount: number
	underProxyNum: number
	directlyUnderProxyNum: number
	underMemberNum: number
	directlyUnderMemberNum: number
	currency: string
	rebateAmount: number
	walletBalance: number
	creditBalance: number
	creditQuota: number
	returnLoan: number
	proxyToMemDifferAmount: number
	proxyToMemTimes: string
	proxyToChildDifferAmount: number
	proxyToChildTimes: string
	proxyBeDifferAmount: number
	proxyBeDifferTimes: string
	officerProxyCashUpAmount: number
	officerProxyCashUpTimes: string
	proxyBeCashUpAmount: number
	proxyBeCashUpTimes: string
	proxyToChildCashUpAmount: number
	proxyToChildCashUpTimes: string
	proxyToMemCashUpAmount: number
	proxyToMemCashUpTimes: string
	officerProxyCashDownAmount: number
	officerProxyCashDownTimes: string
	proxyBeCashDownAmount: number
	proxyBeCashDownTimes: string
	proxyToChildCashDownAmount: number
	proxyToChildCashDownTimes: string
	proxyToMemCashDownAmount: number
	proxyToMemCashDownTimes: string
	officerProxyCreditUpAmount: number
	officerProxyCreditUpTimes: string
	proxyBeCreditUpAmount: number
	proxyBeCreditUpTimes: string
	proxyToChildCreditUpAmount: number
	proxyToChildCreditUpTimes: string
	proxyToMemCreditUpAmount: number
	proxyToMemCreditUpTimes: string
	officerProxyCreditDownAmount: number
	officerProxyCreditDownTimes: string
	proxyBeCreditDownAmount: number
	proxyBeCreditDownTimes: string
	proxyToChildCreditDownAmount: number
	proxyToChildCreditDownTimes: string
	proxyToMemCreditDownAmount: number
	proxyToMemCreditDownTimes: string
	otherAdjustAmount: number
	commissionAmount: number
	commissionAdjustAmount: number
	firstDeposit: number
	firstDepositDatetime: string
	officialHelpProxyCreditRepayAmount: number
	officialHelpProxyCreditRepayTimes: string
	parentProxyHelpProxyCreditRepayAmount: number
	parentProxyHelpProxyCreditRepayTimes: string
	proxyHelpSubProxyCreditRepayAmount: number
	proxyHelpSubProxyCreditRepayTimes: string
	proxyHelpSubMemberCreditRepayAmount: number
	proxyHelpSubMemberCreditRepayTimes: string
}

export interface IQueryMemberReport {
	minBetCount?: string
	maxBetCount?: string
	minBetAmount?: string
	maxBetAmount?: string
	minValidBetAmount?: string
	maxValidBetAmount?: string
	minNetAmount?: string
	maxNetAmount?: string
	playerName?: string
	accountType?: string
	startTime?: string
	endTime?: string
	queryWay?: number
	parentProxyName?: string
	topProxyName?: string
}

export interface IMemberReportList extends Omit<IAgentProfitLossList, "record"> {
	record: IMemberReportState[]
	summary: IMemberReportState
}

export interface IMemberReportState {
	firstDepositAmount: number
	firstDepositTime: string | null
	depositAmount: number
	depositTimes: number
	withdrawAmount: number
	withdrawTimes: number
	depositWithdrawDifferAmount: number
	betCount: number | null
	betAmount: number | null
	validBetAmount: number | null
	netAmount: number
	returnWaterAmount: number
	discountAmount: number
	otherAdjustAmount: number
	netProfit: number
	proxyAssistDepositAmount: number
	proxyAssistDepositTimes: number
	proxyTransferInnerAmount: number
	proxyTransferInnerTimes: number
	switchProxyCount: number
	proxyUpAmount: number | null
	proxyUpTimes: number | null
	proxyDownAmount: number | null
	proxyDownTimes: number | null
	proxyCreditUpAmount: number
	proxyCreditUpTimes: number
	proxyCreditDownAmount: number
	proxyCreditDownTimes: number
	proxyCreditDifferAmount: number
	rebateAmount: number
	memberRebateAmountByProxy: number
	memberRebateAmountByPlat: number
	proxyCashUpAmount: number
	proxyCashUpTimes: number
	proxyCashDownAmount: number
	proxyCashDownTimes: number
	proxyHelpCreditRepayAmount: number
	proxyHelpCreditRepayTimes: number
	proxyCashDifferAmount: number
	registerCount: number | null
	activeCount: number | null
	validUserCount: number | null
	betUserCount: number | null
	merchantId: string
	playerId: string
	playerName: string
	realName: string | null
	accountType: number
	parentProxyId: string
	parentProxyName: string
	topProxyName: string
	topMerchantName: string
	merchantName: string
	vipLevel: number
	loginLockStatus: number
	accountLockStatus: number
	gameLockStatus: number
	registerAt: string
	currency: string
	labelId: string | null
	labelName: string | null
	windControlId: string | null
	windControlName: string
	nickName: string
}

export interface IPlayerDailyStats {
	currency: string
	staticsDate: string
	parentProxyId: string
	parentProxyName: string
	depositAmount: number
	depositTimes: string
	withdrawAmount: number
	withdrawTimes: string
	betCount: string
	betAmount: number
	validBetAmount: number
	netAmount: number
	returnWaterAmount: number
	discountAmount: number
	otherAdjustAmount: number
	netProfit: number
}

export interface IMemberReportQueryParams {
	currency?: string
	playerId?: string
	parentProxyId?: string
	playerName?: string
	merchantId?: string
	queryWay?: number
	userId?: string
	startTime?: string
	endTime?: string
}

export interface IPlayerDailyStatsList extends Omit<IAgentProfitLossList, "record"> {
	record: IPlayerDailyStats[]
}

interface WithdrawLimitInfo {
	userId: string
	userType: number
	withdrawLimitType: number
	onlineWithdrawRemainAmount: number
	offlineWithdrawRemainAmount: number
	withdrawRemainAmount: number
	completeBillAmount?: number | null
	validBillAmount?: number | null
	billStartTime?: string | null
	totalAdjust?: number | null
	withdrawFlag?: number | null
}

interface DepositWithdrawSummaryDTO {
	depositTotal: number
	depositTimes: number
	lastDeposit: number
	bigDepositTimes: number
	withdrawTotal: number
	withdrawTimes: number
	lastWithdraw: number
	bigWithdrawTimes: number
}

export interface BalanceInfo {
	cash: number
	frozen: number
	gameBalanceInfos?: any | null
	creditAvailable: number
	creditTotal: number
	returnLoan: number
	texasFreezeAmount: number
	currency: string
	withdrawLimitInfo: WithdrawLimitInfo
	depositWithdrawSummaryDTO: DepositWithdrawSummaryDTO
}
